Lab 06 - Using ViewState and Private ViewState

Problem Statement

Code Implementation

Problem 1: Simple Counter using ViewState

Default.aspx

Loading code from file...

Default.aspx.vb

Loading code from file...

Problem 2: Making Viewstate Secure

We can turn on encryption for an individual page using the ViewStateEncryptionMode property of the Page directive: ViewStateEncryptionMode="Always"

Default.aspx

Loading code from file...

Problem 3: Webform that stores three objects of customer in viewstate and retreives customer objects

Customer.vb

Loading code from file...

Default.aspx

Loading code from file...

Default.aspx.vb

Loading code from file...

Sample Output

Problem 1

Problem 2
Output is same as in Problem 1 (ViewState is made private only)

Problem 3

Web hosting by Somee.com